﻿<%@ Page Language="VB" AutoEventWireup="false" CodeFile="_crias.aspx.vb" Inherits="Registro_crias" %>

<%@ Register Src="~/Controles/MenuPopup.ascx" TagName="Menu" TagPrefix="CC" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Consulta crias</title>
    <link href="../Estilos/screen.css" rel="Stylesheet" type="text/css" />
    <link href="../Estilos/formulario.css" rel="Stylesheet" type="text/css" />
    <style type="text/css" media="all">
        body
        {
            background: #FFF;
            font-family: Arial;
            margin: 0px auto;
            font-size: 0.65em;
        }
        #titulo
        {
            background-color: #2F2F4F;
            color: #FFFFFF;
            padding: 5px;
            font-weight: 700;
            display: block;
        }
        h3
        {
            font-size: 0.9em;
            margin: 0px;
        }
        .menu
        {
            display: block;
            text-align: center;
        }
        .label2
        {
            background-color: #2F2F4F;
            color: #FFFFFF;
            padding: 2px;
            font-weight: 700;
            color: #FFFFFF;
            text-align: center;
        }
        .label2 a
        {
            text-decoration: none;
            color: #FFFFFF;
        }
        .formato
        {
            width: 660px;
            background: #F7F7F7;
            font-size: 0.8em;
            height: 390px;
        }
        .label2 a:hover span
        {
            background-color: #000000;
        }
        .label
        {
            background-color: #3299CC;
            color: #FFFFFF;
            padding: 2px;
            font-weight: 700;
            color: #FFFFFF;
        }
        .datos
        {
            background-color: #FFF;
            padding: 2px;
        }
        #botonesDetalles
        {
            float: right;
            margin: 0 auto;
            padding: 0;
        }
        #botonesDetalles ul
        {
            margin: 0;
            padding: 0px 0px 0px 20px;
            list-style: none;
            line-height: normal;
        }
        #botonesDetalles li
        {
            display: inline;
            margin: 0px;
        }
        .button
        {
            background: url(../images/toolgrad.gif) repeat;
        }
        .button a
        {
            margin: 0px;
            padding: 0px;
            display: block;
            text-decoration: none;
            font-family: Arial, Helvetica, sans-serif;
        }
        .button img
        {
            border: none;
            margin: 0px;
            padding: 0px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <CC:Menu runat="server" ID="Menu" />
    <div>
        <h3>
            <span id="titulo">
                <asp:Label runat="server" ID="lblClaveAnimal" Text="T822C1982" />
                &nbsp;
                <asp:Label runat="server" ID="lblNombreTitulo" Text="COMINITO" />
                &nbsp; <span style="float: right; margin: 0px; padding: 0px;">ID:<asp:Label runat="server"
                    ID="lblAnimalId" Text="918" /></span> </span>
        </h3>
    </div>
    <div class="formulario">
            <fieldset>
                <legend>CRIAS</legend>
                <table width="40%" style="font-family: Calibri, Arial; font-weight: bold; font-size: 16px"
                    align="center">
                    <tr>
                        <td class="FormHeaderTD">
                            <center>
                                <asp:Label ID="lblAnimal" runat="server" Text="Animal"></asp:Label></center>
                        </td>
                    </tr>
                </table>
                <br />
                <table align="center" width="380px">
                    <tr>
                        <td>
                            &nbsp;
                        </td>
                        <td colspan="2" class="FormHeader" align="center">
                            &nbsp;HIJOS:
                            <asp:Label runat="server" ID="lblHijos">0</asp:Label>
                        </td>
                        <td colspan="2" class="FormHeader" align="center">
                            HIJAS:&nbsp;<asp:Label runat="server" ID="lblHijas">0</asp:Label>
                        </td>
                        <td colspan="2" class="FormHeader" align="center">
                            GENERAL:
                            <asp:Label runat="server" ID="lblCrias">0</asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;
                        </td>
                        <td class="FormHeaderTD" align="center">
                            Tienta
                        </td>
                        <td class="FormHeaderTD" align="center">
                            Lidia
                        </td>
                        <td class="FormHeaderTD" align="center">
                            Tienta
                        </td>
                        <td class="FormHeaderTD" align="center">
                            Lidia
                        </td>
                        <td class="FormHeaderTD" align="center">
                            Tienta
                        </td>
                        <td class="FormHeaderTD" align="center">
                            Lidia
                        </td>
                    </tr>
                    <tr>
                        <td class="FormHeaderTD">
                            A Pie
                        </td>
                        <td class="DataTD" align="center">
                            <asp:Label ID="lblTientaAP_Hijos" runat="server" Text="-"></asp:Label>
                        </td>
                        <td class="DataTD" align="center">
                            <asp:Label ID="lblLidiaAP_Hijos" runat="server" Text="-"></asp:Label>
                        </td>
                        <td class="DataTD" align="center">
                            <asp:Label ID="lblTientaAP_Hijas" runat="server" Text="-"></asp:Label>
                        </td>
                        <td class="DataTD" align="center">
                            <asp:Label ID="lblLidiaAP_Hijas" runat="server" Text="-"></asp:Label>
                        </td>
                        <td class="DataTD" align="center">
                            <asp:Label runat="server" ID="lblTienta_AP">-</asp:Label>
                        </td>
                        <td class="DataTD" align="center">
                            <asp:Label runat="server" ID="lblLidia_AP">-</asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="FormHeaderTD">
                            A Caballo&nbsp;
                        </td>
                        <td class="DataTD" align="center">
                            <asp:Label ID="lblTientaAC_Hijos" runat="server" Text="-"></asp:Label>
                        </td>
                        <td class="DataTD" align="center">
                            <asp:Label ID="lblLidiaAC_Hijos" runat="server" Text="-"></asp:Label>
                        </td>
                        <td class="DataTD" align="center">
                            <asp:Label ID="lblTientaAC_Hijas" runat="server" Text="-"></asp:Label>
                        </td>
                        <td class="DataTD" align="center">
                            <asp:Label ID="lblLidiaAC_Hijas" runat="server" Text="-"></asp:Label>
                        </td>
                        <td class="DataTD" align="center">
                            <asp:Label runat="server" ID="lblTienta_AC">-</asp:Label>
                        </td>
                        <td class="DataTD" align="center">
                            <asp:Label runat="server" ID="lblLidia_AC">-</asp:Label>
                        </td>
                    </tr>
                </table>
                <br />
                <asp:GridView ID="grvCrias" runat="server" AllowSorting="True" AutoGenerateColumns="False"
                    DataSourceID="odsCrias" HorizontalAlign="Center" CellPadding="4" ForeColor="#333333"
                    GridLines="None" PageSize="30">
                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                    <Columns>
                        <asp:BoundField DataField="sexo" HeaderText="Sx" SortExpression="sexo" />
                        <asp:TemplateField HeaderText="Animal" SortExpression="Animal">
                            <ItemTemplate>
                                <asp:HyperLink ID="hlAnimal" runat="server" ToolTip="Detalles del animal" NavigateUrl='<%# Eval("AnimalId", "~/Registro/detalles.aspx?animal={0}") %>'
                                    Text='<%# Eval("Animal") %>' CssClass="detalles"></asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="nombre" HeaderText="Nombre" SortExpression="nombre" />
                        <asp:BoundField DataField="pelaje1" HeaderText="Pelaje" SortExpression="pelaje1" />
                        <asp:BoundField DataField="porcien_cs" HeaderText="% CS" SortExpression="porcien_cs" />
                        <asp:TemplateField HeaderText="Padre" SortExpression="padre">
                            <ItemTemplate>
                                <asp:HyperLink ID="hlPadre" runat="server" ToolTip="Detalles del padre" NavigateUrl='<%# Eval("Id_padre", "~/Registro/detalles.aspx?animal={0}") %>'
                                    Text='<%# Eval("padre") %>' CssClass="detalles"></asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Madre" SortExpression="madre">
                            <ItemTemplate>
                                <asp:HyperLink ID="hlMadre" runat="server" ToolTip="Detalles de la madre" NavigateUrl='<%# Eval("id_madre", "~/Registro/detalles.aspx?animal={0}") %>'
                                    Text='<%# Eval("madre") %>' CssClass="detalles"></asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="abuelo_mat" HeaderText="Abuelo" SortExpression="abuelo_mat" />
                        <asp:BoundField DataField="tienta_ac" HeaderText="TC" SortExpression="tienta_ac" />
                        <asp:BoundField DataField="tienta_ap" HeaderText="TP" SortExpression="tienta_ap" />
                        <asp:BoundField DataField="lidia_ac" HeaderText="LC" SortExpression="lidia_ac" />
                        <asp:BoundField DataField="lidia_ap" HeaderText="LP" SortExpression="lidia_ap" />
                        <asp:BoundField DataField="estatus" HeaderText="ST" SortExpression="estatus" />
                        <asp:BoundField DataField="fechabaja" HeaderText="Baja" SortExpression="fechabaja"
                            DataFormatString="{0:d}" />
                        <asp:BoundField DataField="hijos" HeaderText="Hijos" SortExpression="hijos" />
                        <asp:BoundField DataField="hijas" HeaderText="Hijas" SortExpression="hijas" />
                        <asp:BoundField DataField="tienta_fecha" HeaderText="Tienta" SortExpression="tienta_fecha"
                            DataFormatString="{0:d}" />
                        <asp:BoundField DataField="tienta_torero" HeaderText="Torero" SortExpression="tienta_torero" />
                    </Columns>
                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                    <EmptyDataTemplate>
                        <div class="info">
                            No existen crias para el animal seleccionado.
                        </div>
                    </EmptyDataTemplate>
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <EditRowStyle BackColor="#999999" />
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                </asp:GridView>
                <asp:ObjectDataSource ID="odsCrias" runat="server" OldValuesParameterFormatString="original_{0}"
                    SelectMethod="GetCriasById" TypeName="Tom0014TableAdapters.CriasTableAdapter">
                    <SelectParameters>
                        <asp:QueryStringParameter DefaultValue="0" Name="Animal" QueryStringField="animal"
                            Type="Int32" />
                    </SelectParameters>
                </asp:ObjectDataSource>
            </fieldset>
        </div>
    </form>
</body>
</html>
